package com.example.demo.project2.controller;

import com.example.demo.project2.api.UserApi;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class UserController {

    @Resource
    private UserApi userApi;

    @GetMapping("/getAge")
    public String getAge(Long id) {
        return id + "-" + userApi.getAge();
    }
}
